﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Silent.MDB.Common.Data;

namespace Silent.MDB.Server.Model.Contexts.Configurations.Entities
{
    public class RootObjectConfiguration : EntityTypeConfiguration<RootObject>
    {
        public RootObjectConfiguration()
        {
            HasKey(x => x.ObjectId);
            Property(e => e.ObjectId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
            ToTable(typeof(RootObject).Name);
            Property(x => x.Name).HasMaxLength(255);
        }
    }
}